package com.jzo2o.customer.controller.operation;


import com.jzo2o.common.model.PageResult;
import com.jzo2o.customer.model.dto.request.CertificationAuditReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditPageQueryReqDTO;
import com.jzo2o.customer.model.dto.response.WorkerCertificationAuditResDTO;
import com.jzo2o.customer.service.WorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController("operationWorkerCertificationAuditController")
@RequestMapping("/operation/worker-certification-audit")
@Api(tags = "管理端 - 服务人员认证信息查询")
public class WorkerCertificationAuditController {
    @Resource
    WorkerCertificationAuditService workerCertificationAuditService;

    @GetMapping("/page")
    @ApiOperation("服务人员认证信息分页查询")
    public PageResult<WorkerCertificationAuditResDTO> page(WorkerCertificationAuditPageQueryReqDTO workerCertificationPageQueryReqDTO) {
        return workerCertificationAuditService.getpage(workerCertificationPageQueryReqDTO);
    }

    @PutMapping("/audit")
    @ApiOperation("审核认证")
    public void audit(CertificationAuditReqDTO certificationAuditReqDTO) {
        workerCertificationAuditService.audit(certificationAuditReqDTO);
    }
}
